package design.pattern.SimpleFactory;

/**
 * 工厂类
 */
public class OperationFactory {

    public static Operation create(String oper){
        switch (oper){
            case "+" : return new OperationAdd();
            case "-" : return new OperationDel();
            case "*" : return new OperationMul();
            case "/" : return new OperationDIv();
            default:
                return null;
        }
    }
}
